package com.ronglian.register_mini_program.service.impl;

import com.ronglian.register_mini_program.dao.RecommendImgMapper;
import com.ronglian.register_mini_program.model.RecommendImgExample;
import com.ronglian.register_mini_program.model.RecommendImgWithBLOBs;
import com.ronglian.register_mini_program.service.RecommendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("RecommendService")
public class RecommendServiceImpl implements RecommendService {

    @Autowired
    public RecommendImgMapper recommendImgMapper;

    @Override
    public List<RecommendImgWithBLOBs> getAllRecommendImgList() {
        RecommendImgExample rc_img_exapmple = new RecommendImgExample();
        RecommendImgExample.Criteria rc_img_c = rc_img_exapmple.createCriteria();
        rc_img_exapmple.setOrderByClause("rcd_index asc");
        List<RecommendImgWithBLOBs> recommendImgs = recommendImgMapper.selectByExampleWithBLOBs(rc_img_exapmple);
        if (recommendImgs != null && recommendImgs.size() > 0) {
            return recommendImgs;
        }
        return null;
    }
}
